home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / rokv203a.zip / ROK.ZIP / STRUCTS.PAS < prev    next >
Pascal/Delphi Source File  |  1997-06-22  |  17KB  |  265 lines

  1. {┌────────────────────────────────────────────────────────────────────────────┐
  2.  │  ▄▄▄▄▄▄▄▄▄▄▄▄    ▄▄▄▄▄▄▄▄▄▄▄   ▄       ▄   ** ROK Data File Structures **  │
  3.  │ █            █  █           █  █     ▄▀                                    │
  4.  │ █            █  █           █  █   ▄▀     ROK, created by Devon Brooks, of │
  5.  │ █            █  █           █  █ ▄▀       Blazing Fire Software - (C) 1997 │
  6.  │ █▀▀▀▀█▀▀▀▀▀▀▀   █           █  █▀▄                                         │
  7.  │ █     ▀▄        █           █  █  ▀▄       Distribute Freely To Everyone!  │
  8.  │ █       ▀▄      █           █  █    ▀▄                                     │
  9.  │ █         ▀▄    █           █  █      ▀▄   Create EGO's, Utilities for the │
  10.  │ ▀           ▀    ▀▀▀▀▀▀▀▀▀▀▀   ▀        ▀     SysOp - and so much more!    │
  11.  └────────────────────────────────────────────────────────────────────────────┘}
  12.  
  13. { Hi there! I'm Devon Brooks, the Author of ROK.  I'm writing this STRUCTS.PAS }
  14. { file for 3rd Party Authors to create stuff for ROK.   Feel free to charge    }
  15. { anything you wish for your program -- we do not require any "Royalty" fee on }
  16. { 3rd Party Programs -- so ask for a registration that you see fit.            }
  17.  
  18. { ** -NEW- v2.03 <06/22/97> -NEW- **                                           }
  19.  
  20. { One thing I'd like to point out.  ROK automatically passes the node number   }
  21. { to the EGO.  Thus, your EGO automatically has the node number stored in the  }
  22. { ParamStr(1) (the first parameter).  Many have asked about this, so here is   }
  23. { the information.  If you are unclear about this, e-mail us, and we'll help   }
  24. { you through the programming troubles.                                        }
  25.  
  26. { A new line has been added to the ROKINFO.<x> files.  Line 10 now has the com }
  27. { routine type that ROK uses.  It will be INTERNAL/FOSSIL/XFOSSIL.  This will  }
  28. { help some developers who've been having trouble finding ROK's com routines.  }
  29.  
  30. { A bunch of new variables have been added to the user records, so make note   }
  31. { of them when you update your code into the v2.03 format.                     }
  32. {                                                               -The BFS Guys- }
  33.  
  34. { ** -NEW- (the above info) -NEW- **                                           }
  35.  
  36. { NOTE - These structs and the following information is based on a programming }
  37. {        language called "Turbo Pascal". If you do not have this language, you }
  38. {        will have to somehow convert these records into your own format.      }
  39.  
  40. { Hey, you want to write an EGO?  Excellent!  It is really quite simple.  It's }
  41. { basically a three step process, like this:                                   }
  42. {                     1. Read in ROKINFO.<x>, where <x> is the node number of  }
  43. {                        the current online user.                              }
  44. {                     2. Load up the PLAYER.DAT file, and find the player name }
  45. {                        that matches the name in the ROKINFO.<x> file.        }
  46. {                     3. That's it!  You're on your way -- start your program! }
  47.  
  48. { In future versions of ROK, possibly the next version, an EGO Development Kit }
  49. { will be included in the ROKV*.ZIP Archive to help 3rd Party Authors create a }
  50. { ROK EGO, or any other program relating to ROK.   Unfortunately, for now, you }
  51. { are basically on your own.   Here are a few tips to help you out in creating }
  52. { your own program for ROK :                                                   }
  53.  
  54. { 1. Download a copy of the latest version of DDPlus - DDPLUS71.ZIP. It should }
  55. {    be available from almost any BBS system in your area, or somewhere on the }
  56. {    Internet.  We used DDPlus to create ROK. It is a simple to use DoorDriver }
  57. {    which should easily take care of most of your problems with your program. }
  58. { 2. To trap errors in your program I suggest using a Unit that is included in }
  59. {    the DDPLUS71.ZIP Archive - ELOG.PAS. It will trap and log all errors that }
  60. {    might occur in your program, and will help you in finding the cause.      }
  61. { 3. Ask one of your friends who knows TP, or someone in the FidoNet Echo, for }
  62. {    a procedure which will save bad error exits.  What this means is that if, }
  63. {    for some reason, your program has an error and halts - it will not save a }
  64. {    user's new information.   With a procedure/function at the end to save no }
  65. {    matter what type of an exit, your program will run much smoother, regard- }
  66. {    less of what happens while inside the program.  If you cannot find such a }
  67. {    procedure/function, contact Devon Brooks, the Author of ROK, and he might }
  68. {    be able to give you the same procedure that is used to trap exits in ROK. }
  69. { 4. There is nothing more that we can really help you out in.    Turbo Pascal }
  70. {    programming experience would be nice - but, the Author of ROK started his }
  71. {    first program in Turbo Pascal when he had NO previous experience.   Thus, }
  72. {    even if you have never looked at TP before you can learn it quite easily. }
  73. {    If you want some assistance from the ROK Author, feel free to contact him }
  74. {    anytime.  There are quite a few different ways, as listed in CONTACT.DOC, }
  75. {    which would be included in the same archive of which you found this file. }
  76.  
  77. { All user variables in PLAYER.DAT are commented here for your convenience.    }
  78.  
  79. Type UserRecord = Record
  80.  
  81. Real_Name        : String[40]; { User's REAL Name from the BBS DropFile   }
  82. Alias            : String[15]; { User's Alias Name in ROK                 }
  83. Date             : String[15]; { Date Flag -- User's last online date     }
  84. Status           : Byte;       { Current Player Status (1 = Alive, 2 =    }
  85.                                { Dead, 3 = Online, 4 = In Palace Dungeon) }
  86. Arrived_At       : String[10]; { Time user entered ROK (military time)    }
  87. Taxes            : Boolean;    { If TRUE, user has payed Taxes today      }
  88. Hand             : LongInt;    { Gold on Hand                             }
  89. Bank             : LongInt;    { Gold in the Bank                         }
  90. HP               : LongInt;    { Current HP of the character              }
  91. Max_HP           : LongInt;    { Maximum possible HP (Health Points)      }
  92. Sleep            : Byte;       { Where the character is sleeping (0 = The }
  93.                                { Fields, 1 = Inn, 2 = Palace, 3 = An EGO) }
  94. Rank             : Byte;       { Social Rank (1 = Prince, 2 = Duke, 3 =   }
  95.                                { Squire, 4..6 same, but is for Females)   }
  96. Gender           : Byte;       { Player Gender (1 = Male, 2 = Female)     }
  97. P_Fights         : Integer;    { Player vs. Player Fights left for today  }
  98. M_Fights         : Integer;    { Monster Combat Fights left for today     }
  99. Flirt            : Boolean;    { If TRUE, player has flirted with another }
  100.                                { character already today                  }
  101. Charm            : Integer;    { General good looks of the character      }
  102. Str              : LongInt;    { Character's Strength                     }
  103. Def              : LongInt;    { Character's Defense                      }
  104. EXP              : LongInt;    { Character's Experience                   }
  105. Level            : Integer;    { Level of EXP this character is at        }
  106. Weap_Num         : Integer;    { Weapon Number                            }
  107. Weap_Nam         : String[20]; { Name of the Weapon character is using    }
  108. Arm_Num          : Integer;    { Armour Number                            }
  109. Arm_Nam          : String[20]; { Name of the Armour character is using    }
  110. Guild            : Byte;       { Guild Character belongs to (1 = Paladin, }
  111.                                { 2 = Cleric, 3 = Sorcerer, 4 = Assassin,  }
  112.                                { 5 = Warrior, 6 = Ninja)                  }
  113. GM               : Boolean;    { TRUE if this player is GuildMaster of    }
  114.                                { their Guild                              }
  115. On_Today         : Boolean;    { Has this character already been in ROK   }
  116.                                { today?  If so, then this is TRUE.        }
  117. Master           : Boolean;    { Has this character fought a Level Master }
  118.                                { and Lost/Ran already today?              }
  119. Macbeth          : Boolean;    { Has this character fought Macbeth today? }
  120. M_Won            : Boolean;    { Has this char. killed MacBeth yesterday? }
  121.                                { If TRUE, then ROKMAINT will decrease the }
  122.                    { character's strength by 10,000.          }
  123. Bank_Rob         : Boolean;    { Has this player Robbed the Bank today?   }
  124. Cursed           : Byte;       { Player's Feelings (0 = Normal, 1 =       }
  125.                                { Cursed, 2 = Blessed)                     }
  126. Prayed           : Boolean;    { Has player prayed to Gods already today? }
  127. Married_To       : String[40]; { Who is this character married to? *REAL* }
  128.                                { name of the character.                   }
  129. Sex              : Integer;    { Number of times this character has had   }
  130.                                { sex with another character in the game.  }
  131. Loot             : Boolean;    { Has this character looted a destroyed    }
  132.                                { shop already today?                      }
  133. Train            : Boolean;    { Has this character trained under Atma    }
  134.                                { already today?                           }
  135. Seen_Book        : Boolean;    { Has this character viewed Othello's Book }
  136.                                { of Many Secrets already today?           }
  137. Potions          : Integer;    { # of potions this character has bought   }
  138.                                { already today.                           }
  139. Times_Won        : Integer;    { Number of times this character has slain }
  140.                                { Sakar Kane (the end guy in the Realm).   }
  141. Q_Assigned       : Boolean;    { Has Quest been assigned to a char today? }
  142. Quests           : Integer;    { Number of Quests this char has finished. }
  143. P_Kills          : Integer;    { Total # of Player Kills this char. has.  }
  144. M_Kills          : Integer;    { Total # of Monster Kills this char. has. }
  145.  
  146. Paladin_Skill    : Integer; {Rate of Magical Skill the Paladin is at}
  147. Paladin_Spell_1  : Integer; {Paladin's Guild - Player's First Spell}
  148. Paladin_Spell_2  : Integer; {Paladin's Guild - Player's Second Spell}
  149. Paladin_Spell_3  : Integer; {Paladin's Guild - Player's Third Spell}
  150. Cleric_Skill     : Integer; {Rate of Magical Skill the Cleric is at}
  151. Cleric_Spell_1   : Integer; {Cleric's Guild - Player's First Spell}
  152. Cleric_Spell_2   : Integer; {Cleric's Guild - Player's Second Spell}
  153. Cleric_Spell_3   : Integer; {Cleric's Guild - Player's Third Spell}
  154. Cleric_Spell_4   : Integer; {Cleric's Guild - Player's Fourth Spell}
  155. Cleric_Spell_5   : Integer; {Cleric's Guild - Player's Fifth Spell}
  156. Sorcerer_Skill   : Integer; {Rate of Magical Skill the Sorcerer is at}
  157. Sorcerer_Spell_1 : Integer; {Sorcerer's Guild - Player's First Spell}
  158. Sorcerer_Spell_2 : Integer; {Sorcerer's Guild - Player's Second Spell}
  159. Sorcerer_Spell_3 : Integer; {Sorcerer's Guild - Player's Third Spell}
  160. Sorcerer_Spell_4 : Integer; {Sorcerer's Guild - Player's Fourth Spell}
  161. Sorcerer_Spell_5 : Integer; {Sorcerer's Guild - Player's Fifth Spell}
  162. Assassin_Skill   : Integer; {Rate of Technique Skill the Assassin is at}
  163. Assassin_Tech_1  : Integer; {Assassin's Guild - Player's First Technique}
  164. Assassin_Tech_2  : Integer; {Assassin's Guild - Player's Second Technique}
  165. Assassin_Tech_3  : Integer; {Assassin's Guild - Player's Third Technique}
  166. Used_A_Tech_1    : Boolean; {Assassin's Guild - Has player used Tech #1 Today?}
  167. Used_A_Tech_2    : Boolean; {Assassin's Guild - Has player used Tech #2 Today?}
  168. Used_A_Tech_3    : Boolean; {Assassin's Guild - Has player used Tech #3 Today?}
  169. Warrior_SKLeft   : Integer; {Number of points unused for transfer in WGuild}
  170. Sk_Left          : Integer; {Guild Skills left for today}
  171.  
  172. End;
  173.  
  174. { Below is the record structure for the 200 monsters in ROK. (ROKMON.DAT)      }
  175.  
  176. MonData = Record
  177.  
  178. Name     : String[40];
  179. Weapon   : String[40];
  180. Strength : LongInt;
  181. Gold     : LongInt;
  182. Exp      : LongInt;
  183. HP       : LongInt;
  184.  
  185. End;
  186.  
  187. { Below is the record structure for the Level Masters in ROK. (TRAINER.DAT)    }
  188.  
  189. TrainData = Record
  190.  
  191. Exp      : LongInt;    { Experience required before player can challenge him }
  192. Name     : String[40]; { Level Master's name }
  193. Weapon   : String[40]; { Name of Master's weapon }
  194. Strength : LongInt;    { Master's strength }
  195. Defense  : LongInt;    { It's defense }
  196. HP       : LongInt;    { Total Hit Points of the Master }
  197.  
  198. End;
  199.  
  200. { Lastly, below is the record structure for EGO's. (EGOS.DAT)                  }
  201.  
  202. EGOData = Record
  203.  
  204. EGO_Name   : String[40]; { Name of the EGO }
  205. EGO_Path   : String;     { Path to EGO Executable }
  206. EGO_Cost   : LongInt;    { Cost for Kingdom to construct EGO }
  207. EGO_Built  : Boolean;    { Is this EGO built yet? }
  208. EGO_Desc1,
  209. EGO_Desc2,
  210. EGO_Desc3,
  211. EGO_Desc4  : String[75]; { A four-line max description of this EGO }
  212.  
  213. End;
  214.  
  215. { SOME INFORMATION REGARDING EGO DEVELOPMENT:                                  }
  216. { We at BFS want to stress the importance of following the set guidelines for  }
  217. { EGO developers.  When creating your EGO, keep these points in mind:          }
  218. {                             1. A Maximum of 10 EGO's can be in the EGOS.DAT  }
  219. {                                file.  When installing your EGO, check to see }
  220. {                                if 10 EGO's are already installed, to prevent }
  221. {                                possible mix-ups.
  222. {                             2. Please have an option for an uninstall of     }
  223. {                                your EGO.  This must take out ALL the info    }
  224. {                                that your installation procedure entered into }
  225. {                                the EGOS.DAT file -- including description,   }
  226. {                                path, and everything else.                    }
  227. {                             3. One thing to remember upon installation of    }
  228. {                                your EGO is to check if it's already been     }
  229. {                                installed.  Always a good thing.              }
  230. { That's it!  Or, at least, that's all we can think of at this point.  To get  }
  231. { your EGO/Utility/3rdParty product on the list in EGOLIST.TXT, refer to the   }
  232. { bottom of that file for more information.                                    }
  233.  
  234. { Upon the exit of ROK to run an EGO, ROKINFO.<x> is created, where <x> is the }
  235. { node number that the user is on.  ROKINFO.x is a drop file.  As your EGO is  }
  236. { loading up, if need be, you might want to read in the ROKINFO.x file.  Below }
  237. { is the format for this file:                                                 }
  238.  
  239. {      Line 1  ---> Record Number of the user in the PLAYER.DAT file           }
  240. {      Line 2  ---> Graphics Code.  3 = ANSI Graphics, else ASCII.             }
  241. {      Line 3  ---> Time remaining online                                      }
  242. {      Line 4  ---> ROK Alias of the character                                 }
  243. {      Line 5  ---> First *REAL* Name of the user                              }
  244. {      Line 6  ---> Last *REAL* Name of the user                               }
  245. {      Line 7  ---> Com Port the modem is running on                           }
  246. {      Line 8  ---> Actual Baud Rate                                           }
  247. {      Line 9  ---> Locked Baud Rate                                           }
  248. {      Line 10 ---> Communications type (FOSSIL, XFOSSIL, or INTERNAL).        }
  249.  
  250. { That is the format of the ROKINFO.<x> file.  A 10-Line drop file format.     }
  251.  
  252. { Well, that's all of them!  As mentioned above, if you require assistance in  }
  253. { regards to the structs shown here, please feel free to contact us anytime.   }
  254.  
  255. { Please refer to the BFS_EGOS.<x> file included in this archive, for more EGO }
  256. { and other 3rdParty related products. For your product to be recognized by us }
  257. { in the EGOLIST.TXT, you must receive the "BFS Stamp of Approval".  More info }
  258. { is given at the bottom of EGOLIST.TXT.                                       }
  259.  
  260. { Best of luck to you and your program(s) from all of us at BFS!               }
  261. {                                                           - The BFS guys     }
  262.  
  263. Begin
  264. End.
  265.